package com.joshua.spring.gateway.constant;

/**
 * projectName dragon-cloud
 * package com.joshua.spring.gateway.constant
 * classname  RedisConstants
 * <p>
 * description redis常量
 * </p>
 *
 * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
 * @date 2020/8/22 15:04
 */
public interface RedisConstants {
    String SET = "set";
    String DEL = "del";
    String H_SET = "hset";
    String H_DEL = "hdel";
    String KEY_SPLIT = SymbolConstants.COLON;

    interface GatewayKey {
        String ROUTE_INFO_KEY = String.format(Formatter.KEY_FORMATTER, Prefix.GATEWAY, Prefix.ROUTES);
    }

    interface Prefix {
        String GATEWAY = "gateway";
        String ROUTES = "routes";
    }

    interface Formatter {
        String KEY_FORMATTER = "%s:%s";
        String KEY_EVENT_FORMATTER = "__keyevent@%s__:%s";
    }
}
